//
//  SHTradingQuryBaseCell.m
//  JiFengDaRen
//
//  Created by SH_iOS on 2017/10/23.
//  Copyright © 2017年 SH_iOS. All rights reserved.
//

#import "SHTradingQuryBaseCell.h"
@interface SHTradingQuryBaseCell()
@property(nonatomic,strong)UILabel *leftLabel;
@property(nonatomic,strong)UILabel *nameLabel;
@property(nonatomic,strong) UIImageView *arrow;//右侧箭头

@end
@implementation SHTradingQuryBaseCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self configUI];
        
    }
    return self;
}

- (void)configUI{
    
    self.leftLabel = [[UILabel alloc]init];
    self.leftLabel.font = KSystemFont(__I6Width(14));
    self.leftLabel.text = @"支付方式";
    self.leftLabel.textColor = [UIColor colorWithHexString:@"#999999"];
    [self.contentView addSubview:self.leftLabel];
    self.nameLabel = [[UILabel alloc]init];
    self.nameLabel.font = KSystemFont(__I6Width(14));
    self.nameLabel.text = @"";
    self.nameLabel.textColor = [UIColor colorWithHexString:@"#333333"];
    [self.contentView addSubview:self.nameLabel];
    
    
    
    self.arrow = [[UIImageView alloc]init];
    self.arrow.image = [UIImage imageNamed:@"jmarrow@2x.png"];
    [self.contentView addSubview:self.arrow ];
    UIView *line = [[UIView alloc]initWithFrame:CGRectMake(0,__I6Height(43.5), KScreenWidth, 0.5)];
     line.backgroundColor = KBASEBGCOLOR;
    [self.contentView addSubview:line];
    
}
- (void)layoutSubviews{
    //    [self.icon mas_makeConstraints:^(MASConstraintMaker *make) {
    //        make.width.mas_equalTo(__I6Width(40));
    //        make.height.mas_equalTo(__I6Height(40));
    //    make.left.mas_equalTo(self.mas_left).with.offset(__I6Width(10));
    //        make.centerY.mas_equalTo(self.mas_centerY);
    //    }];
    
    [self.leftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.mas_left).with.offset(__I6Width(15));
        make.centerY.mas_equalTo(self.mas_centerY);
    }];
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(self.mas_right).with.offset(__I6Width(-40));
        make.centerY.mas_equalTo(self.mas_centerY);
    }];
    
    
    
    
    [self.arrow  mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.centerY.equalTo(self.contentView.mas_centerY);
        make.right.equalTo(self.contentView.mas_right).with.offset(__I6Width(-15));
        make.height.mas_equalTo(__I6Height(14));
        make.width.mas_equalTo(__I6Width(7.5));
    }];
    
    
}

- (void)setLeftName:(NSString *)leftName{
    
    self.leftLabel.text = leftName;
    
}
- (void)setContentName:(NSString *)contentName{
    
    self.nameLabel.text = contentName;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
